/**
 *DefaultRenderer.java
 *@anthor Daniel Liu
 *2006-4-28 3:02:31
 **/
package org.lex.swing.table;

import java.awt.Component;

import javax.swing.JTable;
import javax.swing.table.DefaultTableCellRenderer;

public class DefaultRenderer extends DefaultTableCellRenderer {
	private static final DefaultRenderer instance = new DefaultRenderer();

	public static DefaultRenderer getInstance() {
		return instance;
	}

	public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
		if (null == value)
			this.setText("");
		else
			this.setText(String.valueOf(value));
		this.setFont(table.getFont());
		return this;
	}
}
